import {AuthorInfo} from "./configuration/AuthorInfo";
import {Strategy} from "./configuration/Strategy";
import {Target} from "./configuration/Target";
import {Template} from "./configuration/Template";

export class Configuration{
    authorInfo: AuthorInfo;
    strategy: Strategy;
    targets: Target[];
    template: Template;
    database: {};
    constructor(config){
        this.authorInfo = AuthorInfo.parseJson(config.authorInfo);
        this.strategy = Strategy.parseJson(config.strategy, config.datasource.db_type);
        this.database = config.database;
        this.targets = Target.initTargets(config.targets);
        this.template = new Template(config.template_config);
    }

}